const mongoose = require('mongoose')
const schema = mongoose.Schema

const categorySchema= new schema({
    ID:{unique:true,type:String},
    MALL_CATEGORY_NAME:{type:String},
    IMAGE:{type:String},
    TYPE:{type:Number},
    SORT:{type:Number},
    COMMENTS:{type:String}
})

/**
 * ,{
  collation:'category' //怎么还会存在categories这个集合里面？
}
写了反而报错
{
code: 500,
message: {
ok: 0,
errmsg: "Failed to parse: collation: "category". 'collation' field must be of BSON type object.",
code: 9,
codeName: "FailedToParse",
name: "MongoError"
}
}
 * */

mongoose.model('category',categorySchema)
